/*
 *
 * Version 1.00
 * 
 * Created on 2007-6-4
 * Encoding UTF-8
 */
package net.comm.message.web.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import net.comm.common.GlbFinal;
import net.comm.common.ReturnMessage;


import net.comm.message.service.impl.MessageServiceImpl;
import net.comm.message.web.form.MessageForm;
import net.comm.util.HtmlMessageBox;
import net.comm.web.base.AbstractBaseAction;


/**
 *站内邮件Action
 * @author hcgong(hcgong@sina.com)
 * @version 1.0
 * @date 2007-6-4
 */
public class MsgcontAction extends AbstractBaseAction {
	
	private MessageServiceImpl service = null;
	
	/**
	 * struct-config中该ACTION中的每个forward的常量定义
	 */
	final String OPER_FORWARD = "oper";
	final String LOGIN_FORWARD = "loginFwd";
	
	
	/**
	 *构造方法
	 */
	public MsgcontAction()
	{
		super(false);
		
		/**
		 * 初始化业务组件接口
		 */
		service = new MessageServiceImpl();
	}
	
	/**
	 * 默认动作
	 * 1.action值为空的时候,进入查询页面
	 * 2.每个操作都执行的代码,但是方法必须返回null
	 * @param mapping	 跳转的mapping值	
	 * @param request	 HttpServletRequest对象
	 * @param response	 HttpServletResponse对象
	 */
	public ActionForward startAction(ActionMapping mapping, ActionForm form,
									 HttpServletRequest request , 
									 HttpServletResponse response)
	{
		String action = getReqParam(request , ACTION_KEY);
		if(action == null || action.trim().length() == 0) {
			return mapping.findForward(OPER_FORWARD);
		} else {
			return null;
		}
	}




}
